//import * as request from "request";
//
import * as dbtps from "../types";
import { BaseCommand } from "../base";
//import * as utils from "../util/utils";
/**
 * 登录。
 */
export class Login extends BaseCommand<dbtps.LoginVO, null> {
    public execute(): void {
        this._retain();

        // const data = this.notification.data;
        // const key = "Userlogin2";
        // const timestamp = new Date().getTime().toString();
        // const signature = utils.MD5(key + timestamp);
        // const headers: dbtps.LoginHeaders = { timestamp: timestamp, signature: signature, client: data.client };
        // const send: dbtps.LoginSend = { account: data.account, password: data.password, type: data.type, client_id: data.clientID };

        /*request.post(
            {
                url: "http://wechatse.egret.com/apiv1/user/login2",
                method: "POST",
                json: true,
                headers: headers,
                body: send
            },
            (error, response, body): void => {
                console.log(body);
                this._release(true);
            }
        );*/
    }
}
/**
 * 注销授权。
 */
export class LogoutLicence extends BaseCommand<dbtps.LogoutVO, null> {
    public execute(): void {
        this._retain();

        // const data = this.notification.data;
        // const key = "UseractiveAlone";
        // const timestamp = new Date().getTime().toString();
        // const signature = utils.MD5(key + timestamp);
        // const headers: dbtps.LogoutHeaders = { timestamp: timestamp, signature: signature, client: data.client };
        // const send: dbtps.LogoutSend = { uid: data.uid, client_id: data.clientID };

        /*request.post(
            {
                url: "http://wechatse.egret.com/apiv1/user/activealone",
                method: "POST",
                json: true,
                headers: headers,
                body: send
            },
            (error, response, body): void => {
                console.log(body);
                this._release(true);
            }
        );*/
    }
}